<?php

/**
 *
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.Console.Templates.default.views
 * @since         CakePHP(tm) v 1.2.0.5234
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */
?>
<?php

echo "<?php
\$this->Html->addCrumb('Home', '/admin');
\$this->Html->addCrumb('Lista " . Inflector::humanize($pluralVar) . "', array('action' => 'index'));
\$this->Html->addCrumb('Novo " . Inflector::humanize($pluralVar) . "', array());
?>"
?>
<?php echo "<?php echo \$this->Form->create('" . Inflector::humanize($pluralVar) . ".{$modelClass}', array(
    'inputDefaults' => array(
        'div' => 'form-group',
        'wrapInput' => false,
        'class' => 'form-control'
    ),
    'class' => 'well'
));\n"; ?>


<?php

echo "\t\n";
foreach ($fields as $field) {
    if (strpos($action, 'add') !== false && $field === $primaryKey) {
        continue;
    } elseif (!in_array($field, array('created', 'modified', 'updated'))) {
        echo "\t\techo \$this->Form->input('{$modelClass}.{$field}', array('label' => __d('" . strtolower(Inflector::pluralize($modelClass)) . "', '" . Inflector::camelize($field) . "')));\n";
    }
}
echo "\t\n";
?>
<?php

echo "echo \$this->Form->button('Salvar', array('class' => 'btn btn-success', 'type' => 'submit', 'icon' => 'fa fa-save'));\n
echo \$this->Form->end(); ?>\n";
?>